package com.chance.cc.crawler.prod.command.trigger.domain.commerce.tb.supplement;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.commerce.tb.TaobaoProductCommentCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.tb.supplement.TBProductCommentSupplementCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;
import org.apache.commons.lang3.StringUtils;


public class TBCommonSupplementCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {


    public static void main(String[] args) {
        publishTBCommentScheduleTriggerInfo1();
        publishTBCommentScheduleTriggerInfo2();
        publishTBCommentScheduleTriggerInfo3();
    }

    public static void publishTBCommentScheduleTriggerInfo1(){
        CrawlerJob crawlerJob = TBProductCommentSupplementCrawlerScheduleJob.taobaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),1),
                TaobaoProductCommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "淘宝评论单次采集");
    }

    public static void publishTBCommentScheduleTriggerInfo2(){
        CrawlerJob crawlerJob = TBProductCommentSupplementCrawlerScheduleJob.taobaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),2),
                TaobaoProductCommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "淘宝评论单次采集");
    }

    public static void publishTBCommentScheduleTriggerInfo3(){
        CrawlerJob crawlerJob = TBProductCommentSupplementCrawlerScheduleJob.taobaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),3),
                TaobaoProductCommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "淘宝评论单次采集");
    }

}
